package test;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class demo3 {
    //线程池

    //固定数量
    ExecutorService pool1 = Executors.newFixedThreadPool(10);
    //动态增长
    ExecutorService pool2 = Executors.newCachedThreadPool();
    //只包含单个
    ExecutorService pool3 = Executors.newSingleThreadExecutor();
    //设定延迟时间
    ExecutorService pool4 = Executors.newScheduledThreadPool(100);

    public static void main(String[] args) {

    }
}
